/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Anonymous
 * License Type: Purchased
 */
package com.estate.datalogic;

import org.orm.*;
import java.io.Serializable;
import javax.persistence.*;
/**
 * ORM-Persistable Class
 */
@Entity
@Table(name="clients")
@org.hibernate.annotations.Proxy(lazy=false)
public class Client implements Serializable {
	public Client() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == com.estate.datalogic.ORMConstants.KEY_CLIENT_ADVERTISEMENT) {
			return ORM_advertisement;
		}
		
		return null;
	}
	
	@Transient	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
	};
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="V9F6BA607137FFC8C01608CD1")	
	@org.hibernate.annotations.GenericGenerator(name="V9F6BA607137FFC8C01608CD1", strategy="increment")	
	private int id;
	
	@Column(name="uid", nullable=false, length=20)	
	private String uid;
	
	@Column(name="password", nullable=false, length=30)	
	private String password;
	
	@Column(name="realName", nullable=false, length=20)	
	private String realName;
	
	@Column(name="gender", nullable=false, length=10)	
	private int gender = 0;
	
	@Column(name="email", nullable=false, length=50)	
	private String email;
	
	@Column(name="tel", nullable=true, length=15)	
	private String tel;
	
	@Column(name="question", nullable=true, length=50)	
	private String question;
	
	@Column(name="validateCode", nullable=false, length=20)	
	private String validateCode;
	
	@Column(name="answer", nullable=false, length=50)	
	private String answer;
	
	@Column(name="loginNum", nullable=false)	
	private int loginNum = 0;
	
	@OneToMany(mappedBy="client", cascade=CascadeType.ALL, targetEntity=com.estate.datalogic.Advertisement.class)	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set ORM_advertisement = new java.util.HashSet();
	
	private void setId(int value) {
		this.id = value;
	}
	
	public int getId() {
		return id;
	}
	
	public int getORMID() {
		return getId();
	}
	
	public void setUid(String value) {
		this.uid = value;
	}
	
	public String getUid() {
		return uid;
	}
	
	public void setPassword(String value) {
		this.password = value;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setRealName(String value) {
		this.realName = value;
	}
	
	public String getRealName() {
		return realName;
	}
	
	public void setGender(int value) {
		this.gender = value;
	}
	
	public int getGender() {
		return gender;
	}
	
	public void setEmail(String value) {
		this.email = value;
	}
	
	public String getEmail() {
		return email;
	}
	
	public void setTel(String value) {
		this.tel = value;
	}
	
	public String getTel() {
		return tel;
	}
	
	public void setQuestion(String value) {
		this.question = value;
	}
	
	public String getQuestion() {
		return question;
	}
	
	public void setValidateCode(String value) {
		this.validateCode = value;
	}
	
	public String getValidateCode() {
		return validateCode;
	}
	
	public void setAnswer(String value) {
		this.answer = value;
	}
	
	public String getAnswer() {
		return answer;
	}
	
	public void setLoginNum(int value) {
		this.loginNum = value;
	}
	
	public int getLoginNum() {
		return loginNum;
	}
	
	private void setORM_Advertisement(java.util.Set value) {
		this.ORM_advertisement = value;
	}
	
	private java.util.Set getORM_Advertisement() {
		return ORM_advertisement;
	}
	
	@Transient	
	public final com.estate.datalogic.AdvertisementSetCollection advertisement = new com.estate.datalogic.AdvertisementSetCollection(this, _ormAdapter, com.estate.datalogic.ORMConstants.KEY_CLIENT_ADVERTISEMENT, com.estate.datalogic.ORMConstants.KEY_ADVERTISEMENT_CLIENT, com.estate.datalogic.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getId());
	}
	
}
